package com.qfedu.controller;

import com.qfedu.constants.NodeId;
import com.qfedu.model.Permission;
import com.qfedu.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 概述:
 *
 * @Author: Tbh
 * @Date: 2022/7/2 15:06
 */

@RestController
@RequestMapping("permission")
public class PermissionController {

    @Autowired
    private IPermissionService permissionService;

    @GetMapping("findAll")
    public List<Permission> findAll() {
        List<Permission> list = permissionService.findAll(NodeId.ROOTNODE.getNode());
        return list;
    }
}
